package net.minecraft.src;

public class EntityTrilobite extends EntityWaterMob
{

	public EntityTrilobite(World world)
	{
		super(world);
		texture = "/pph/trilobite.png";
		setSize(0.25F, 0.25F);
	}
	
	public int getMaxHealth()
    {
        return 8;
    }
	
	public void onLivingUpdate()
	{
		if(burstTicks == 0)
		{
			if(rand.nextInt(100) < 5)
			{
				burstTicks = 2 + rand.nextInt(5); //Max 6 ticks
			}
		}
		else
		{
			--burstTicks;
			moveStrafing *= 1.1F;
			moveForward *= 1.1F;
		}
		super.onLivingUpdate();
	}
	
	protected void updateWanderPath()
    {
        boolean flag = false;
        int i = -1;
        int j = -1;
        int k = -1;
        float f = -99999F;
        for(int l = 0; l < 10; l++)
        {
            int i1 = MathHelper.floor_double((posX + (double)rand.nextInt(13)) - 6D);
            int j1;
            if(rand.nextInt(100) <= 10)
            	j1 = MathHelper.floor_double((posY + (double)rand.nextInt(7)));
            else
            	j1 = MathHelper.floor_double((posY + (double)rand.nextInt(7)) - 3D);
            int k1 = MathHelper.floor_double((posZ + (double)rand.nextInt(13)) - 6D);
            float f1 = getBlockPathWeight(i1, j1, k1);
            if(f1 > f)
            {
                f = f1;
                i = i1;
                j = j1;
                k = k1;
                flag = true;
            }
        }

        if(flag)
        {
            setPathToEntity(worldObj.getEntityPathToXYZ(this, i, j, k, 10F));
        }
    }
	
	/*
	public boolean getCanSpawnHere()
    {
        return worldObj.checkIfAABBIsClear(boundingBox) && posY <= 64;
    }
	*/
	
	public void writeEntityToNBT(NBTTagCompound nbttagcompound)
    {
        super.writeEntityToNBT(nbttagcompound);
    }

    public void readEntityFromNBT(NBTTagCompound nbttagcompound)
    {
        super.readEntityFromNBT(nbttagcompound);
    }

    protected String getLivingSound()
    {
        return null;
    }

    protected String getHurtSound()
    {
        return null;
    }

    protected String getDeathSound()
    {
        return null;
    }

    protected float getSoundVolume()
    {
        return 0.4F;
    }

    protected int getDropItemId()
    {
        return 0;
    }
    
    public void fall(float distance)
    {
    	super.fall(distance);
    }

	protected int getDropItemQuantity()
	{
		return 0;
	}
	
	/* AI Properties */
	public int burstTicks = 0;
	
	/* Model Properties */
	public int tailMovement = 0;

}